<fieldset id="sf_fieldset_<?php echo preg_replace('/[^a-z0-9_]/', '_', strtolower($fieldset)) ?>">
  <?php if ('NONE' != $fieldset): ?>
    <h2><?php echo __($fieldset, array(), 'messages') ?></h2>
  <?php endif; ?>

  <?php foreach ($fields as $name => $field): ?>
    <?php if ((isset($form[$name]) && $form[$name]->isHidden()) || (!isset($form[$name]) && $field->isReal())) continue ?>
    <?php if($name=='image_id') continue ?>
    <?php include_partial('blog/form_field', array(
      'name'       => $name,
      'attributes' => $field->getConfig('attributes', array()),
      'label'      => $field->getConfig('label'),
      'help'       => $field->getConfig('help'),
      'form'       => $form,
      'field'      => $field,
      'class'      => 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_form_field_'.$name,
    )) ?>
  <?php endforeach; //add test comment ?>
     <div class="input_file" id="image_upload_wrapper">
         <span>Upload image</span>
    <input type="file" class="add" onChange="return imageUploader.uploadImage(this, imageUploader.setImageUploaded,'blog');" id="image_upload_input" name="upload" />
    </div>
    <div id="image">
        <?php if($image=$article->getImage()):
            ?><img id="<?php echo $image->getId() ?>" width="250" src="<?php echo image_path('/uploads/images/'. $image->getUri()); ?>">
            <?php    endif;
?>
    </div>
<?php include_partial('blog/form_field', array(
      'name'       => 'image_id',
      'attributes' => $fields['image_id']->getConfig('attributes', array()),
      'label'      => $fields['image_id']->getConfig('label'),
      'help'       => $fields['image_id']->getConfig('help'),
      'form'       => $form,
      'field'      => $fields['image_id'],
      'class'      => 'sf_admin_form_row sf_admin_'.strtolower($fields['image_id']->getType()).' sf_admin_form_field_image_id',
    )) ?>
</fieldset>